import request from '@/utils/request'
// 查询分享门店列表
export function listShareRecord(query) {
  return request({
    url: '/mk/shareRecord/list',
    method: 'get',
    params: query
  })
}

//查询分享门店或者设备列表(包括我分享的和分享给我的)
export function myShareList(query) {
  return request({
    url: '/mk/shareRecord/myShareList',
    method: 'get',
    params: query
  })
}

//查询数量
export function selectMkShareCount(query) {
  return request({
    url: '/mk/shareRecord/selectMkShareCount',
    method: 'get',
    params: query
  })
}
//查询门店成员
export function getStoreShareUsers(query) {
  return request({
    url: '/mk/shareRecord/getStoreShareUsers',
    method: 'get',
    params: query
  })
}
// 查询分享门店详细
export function getShareRecord(query) {
  return request({
    url: '/mk/shareRecord/getShareRecord',
    method: 'get',
    params: query
  })
}

// 新增分享门店或者设备
export function addShareRecord(data) {
  return request({
    url: '/mk/shareRecord',
    method: 'post',
    data: data
  })
}

// 修改分享门店或者设备
export function updateShareRecord(data) {
  return request({
    url: '/mk/shareRecord',
    method: 'put',
    data: data
  })
}

export function setIsAdmin(data) {
  return request({
    url: '/mk/shareRecord/setIsAdmin',
    method: 'put',
    data:data
  })
}

// 删除分享门店或者设备
export function delShareRecord(data) {
  return request({
    url: '/mk/shareRecord/deleteShare',
    method: 'delete',
    data:data
  })
}